<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
    <h:head>
        <link rel="shortcut icon" href="Imagenes/database_mysql.ico" type="image/x-icon"/>
        <title>TODO supply a title</title>
        <meta name="viewport" content="width=device-width"/>
    </h:head>
    <h:body>
        <h:form prependId="false">
            <p:growl id="msg" showDetail="true" life="30000"/>
            <p:dataTable var = "globalVariable" value="#{tablePhysical.globalVariables}"
                         paginator="true" rows="15" 
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5, 10, 15"
                         editable="true">
                
                <f:facet name="header">  
                    Variables Del Sistema
                </f:facet>
                
                <p:ajax event="rowEdit" listener="#{tablePhysical.onEdit}" />
                <p:ajax event="rowEditCancel" listener="#{tablePhysical.onCancel}"  />
                
                <p:column headerText="Variable">
                        
                    <h:outputText value="#{globalVariable.variableName}"/>
                    
                </p:column>
                
                <p:column headerText="Valores">
                    <p:cellEditor>
                        <f:facet name="output" >
                            <h:outputText value="#{globalVariable.variableValue}"/>
                        </f:facet>
                        
                        <f:facet name="input" >
                            <p:inputText value="#{globalVariable.variableValue}"
                                         style="width: 100%" />
                        </f:facet>
                    </p:cellEditor>
                </p:column>
                
                <p:column style="width:6%">  
                    <p:rowEditor >
                    </p:rowEditor>
                    
                </p:column>
                
            </p:dataTable>
         </h:form>
    </h:body>
</html>
